/**
 * 
 */
package de.koo.grum.groovy.util

import org.displaytag.decorator.TableDecorator;

/**
 * @author gklinkmann
 *
 */
public class DisplaytagWrapper extends TableDecorator{
	String getLinkContactDataToUser() {
		def contactData = getCurrentRowObject()
		return "<a href=\"/grum/user/show/${contactData.user.id}\">${contactData.user.firstname} ${contactData.user.lastname}</a>";
	}
	String getLinkToGroup() {
		def group = getCurrentRowObject()
		return "<a href=\"/grum/group/show/${group.id}\">${group.name}</a>";
	}
	String getLinkToUser() {
		def user = getCurrentRowObject()
		return "<a href=\"/grum/user/show/${user.id}\">${user.username}</a>";
	}
	String getUserCreatedAt() {
		def user = getCurrentRowObject()
		return user.createdAt.format("dd.MM.yyyy HH:mm");
	}
}
